package com.atguigu.serviceedu.feign;

import com.atguigu.commonutils.R;
import com.atguigu.serviceedu.feign.hystrix.VodFileDegradeFeignClient;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value = "service-vod",fallback = VodFileDegradeFeignClient.class)
public interface VideoFeignService {
    @DeleteMapping("/eduvod/video/removeVideoById/{videoId}")
    public R removeVideo(@ApiParam(name = "videoId", value = "云端视频id", required = true)
                         @PathVariable String videoId);

    @DeleteMapping("/eduvod/video/removeVideoBanth")
    public R removeVideoByIds(@ApiParam(name = "videoId", value = "云端视频id集合", required = true)
                              @RequestParam List<String> sourceIds);
    @GetMapping("/eduvod/video/getUploadVideoTitle/{id}")
    public String getUploadVideoTitle(@PathVariable(value = "id") String sourceId);
}
